import 'package:flutter/material.dart';

class HomeNav extends StatelessWidget {
  HomeNav({super.key, required this.navList});

  List navList = [];

  @override
  Widget build(BuildContext context) {
    return GridView(
      physics: const NeverScrollableScrollPhysics(),
      padding: const EdgeInsets.all(10),
      shrinkWrap: true,
      gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
          crossAxisCount: 5, mainAxisSpacing: 0, crossAxisSpacing: 0),
      children: navList.map((item) {
        return Container(
          child: Column(
            children: [
              Image.network(
                item['imgUrl'],
                width: 40,
                height: 40,
              ),
              Padding(
                padding: EdgeInsets.only(top: 10),
                child: Text(
                  item['text'],
                  style: const TextStyle(fontSize: 12),
                ),
              ),
            ],
          ),
        );
      }).toList(),
    );
  }
}
